---
id: "scope-decorator"
keywords: ["scope", "decorator"]
name: "@scope"
summary: "This is the `@scope` decorator."
category: "decorators"
---

The `@scope` decorator is used with other decorators such as `@val` and `@module` to declare a parent scope for the binding.

### Example

<CodeTab labels={["ReScript", "JS Output"]}>

```res
@scope("Math") @val
external floor: float => int = "floor"

let result = floor(3.4)
```

```js
var result = Math.floor(3.4);
```

</CodeTab>

### References

- [Bind to global JS values](../docs/manual/bind-to-global-js-values.mdx)
